/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package almacenmeta;

/**
 *
 * @author eneko
 */

import java.io.Serializable;
import java.rmi.*;
import java.rmi.registry.*;


public class ServerMetadata implements Serializable{

    public ServerMetadata(int port){
        try{
            LocateRegistry.createRegistry(port);
            Imple ob2=new Imple();
            Naming.rebind("rmi://localhost:"+port+"/metadatos",ob2);
            System.out.println("Servidor de metadatos preparado en puerto "+port);

        }catch(Exception e){
            System.out.println(e);
        }
    }

    public static void main(String s[]){
        new ServerMetadata(1085);
    }
}

